package Pearl.mod;

import java.sql.SQLException;

import org.apache.log4j.Logger;

import Pearl.beans.Users;
import Pearl.dao.AuthentificationDao;
import Pearl.dao.AuthentificationDaoImp;

public class AuthenMod {

	private static final Logger log =Logger.getLogger(UsersMod.class);
	
	public Users authentif(String login){
		
		AuthentificationDao authenfMod = new AuthentificationDaoImp();
		Users us = new Users();
		try{
			us = authenfMod.authentificationLogin(login);
			log.debug("authentif : OK");
		}
		catch(SQLException e){
			e.printStackTrace();
			log.error("rech Mod : error");
		}
		return us;
	}
}
